package com.liang.dao.user;

import com.liang.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    //得到要登录的用户
    public User getLoginUser(Connection connection, String userCode)throws Exception;

    //修改当前用户密码
    public int updatePwd(Connection connection,int id,String pwd) throws Exception;

    //根据用户名或角色名查询总数量
    public int getUserCount(Connection connection,String username,int userRole)throws Exception;

    //通过条件查询-userList
    public List<User> getUserList(Connection connection, String userName, int userRole, int currentPageNo, int pageSize) throws Exception;

    //添加用户
    public int addUser(Connection connection,User user)throws Exception;
}
